package com.cyj.dream.middleware.blackwhitelist.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.cyj.dream.middleware.blackwhitelist.entity.SysBlackWhite;
import com.cyj.dream.middleware.blackwhitelist.persistence.manager.SysBlackWhiteManager;
import com.cyj.dream.middleware.blackwhitelist.service.SysBlackWhiteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 黑白名单标准服务实现层
 * @BelongsProject: DreamChardonnay
 * @BelongsPackage: com.cyj.dream.middleware.blackwhitelist.service.impl
 * @Author: ChenYongJia
 * @CreateTime: 2021-09-15 14:52
 * @Email: chen87647213@163.com
 * @Version: 1.0
 */
@Service
public class SysBlackWhiteServiceImpl implements SysBlackWhiteService {

    @Autowired
    private SysBlackWhiteManager sysBlackWhiteManager;

    /**
     * 查询全部黑白名单信息
     *
     * @return boolean
     * @date 2021-9-15 14:31
     * @author ChenYongJia
     * @version 1.0
     */
    @Override
    public List<SysBlackWhite> getAllSysBlackWhite(){
        return sysBlackWhiteManager.getAllSysBlackWhite();
    }

    /**
     * 根据sysBlackWhiteId查询黑白名单信息
     *
     * @param sysBlackWhiteId 黑白名单id
     * @return boolean
     * @date 2021-9-15 14:31
     * @author ChenYongJia
     * @version 1.0
     */
    @Override
    public SysBlackWhite getSysBlackWhiteById(Long sysBlackWhiteId) {
        return sysBlackWhiteManager.getSysBlackWhiteById(sysBlackWhiteId);
    }

    /**
     * 添加黑白名单信息
     *
     * @param sysBlackWhite 黑白名单对象
     * @return boolean
     * @date 2021-9-15 14:31
     * @author ChenYongJia
     * @version 1.0
     */
    @Override
    public boolean insertSysBlackWhite(SysBlackWhite sysBlackWhite) {
        return sysBlackWhiteManager.insertSysBlackWhite(sysBlackWhite);
    }

    /**
     * 修改黑白名单信息
     *
     * @param sysBlackWhite 黑白名单对象
     * @return boolean
     * @date 2021-9-15 14:31
     * @author ChenYongJia
     * @version 1.0
     */
    @Override
    public boolean updateSysBlackWhite(SysBlackWhite sysBlackWhite) {
        return sysBlackWhiteManager.updateSysBlackWhite(sysBlackWhite);
    }

    /**
     * 删除黑白名单信息
     *
     * @param sysBlackWhite 黑白名单对象
     * @return boolean
     * @date 2021-9-15 14:31
     * @author ChenYongJia
     * @version 1.0
     */
    @Override
    public boolean delSysBlackWhite(List<SysBlackWhite> sysBlackWhite) {
        return sysBlackWhiteManager.delSysBlackWhite(sysBlackWhite);
    }

}
